<template>
	<view>
		<wyb-table
		 ref="table"
		 height="550px"
		 first-col-bg-color="#fff5e1"
		 checker-cell-bg-color="#fff5e1"
		 v-if="wxKey"
		 :key="key"
		 :headers="headers"
		 :contents="contents"
		 :empty-string="emptyString"
		 :header-weight="headerWeight"
		 :first-line-fixed="true"
		 :text-align="textAlign"
		 :url-col="urlCol"
		 :computed-col="computedCol"
		 :bottom-computed-fixed="bottomComputedFixed"
		 :font-size="[30, 27]"
		 :value-format="valueFormat"
		 :format-col="formatCol"
		 :sort-col="sortCol"
		 :sort-ways="sortWays"
		 :loading="loading"
		 :loader-color="loaderColor"
		 :enable-check="enableCheck"
		 @onCheck="onCheck"
		 @onCellClick="onCellClick" />
	</view>
</template>

<script>
	// import wybTable from '@/components/wyb-table/wyb-table.vue'
	// import wybModal from '@/components/wyb-modal/wyb-modal.vue'
	export default {
		// components: {
		// 	wybTable,
		// 	wybModal
		// },
		data() {
			return {
				key: 0,
				wxKey: true,
				headers: [{
					label: '线路',
					key: 'name'
				},  {
					label: '公里',
					key: 'km'
				}, {
					label: '班次',
					key: 'bc'
				}, {
					label: '价格',
					key: 'price'
				}, {
					label: '途径站点',
					key: 'tjzd'
				}, {
					label: '线路',
					key: 'xl'
				}, {
					label: '运行时间',
					key: 'yxsj'
				}],
				contents: []

			}
		},
		onLoad() {
			this.get_kybc()
		},
		methods: {
			get_kybc() {
				uni.showLoading()
				uniCloud.callFunction({
					name: 'get_kybc',
					success: (res) => {
						console.log(res)
						this.contents = res.result.data
						uni.hideLoading()
					}
				})
				
			}
		}
	}
</script>

<style>

</style>
